/**
 * 
 */
package com.ywm8.ywm.admin.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ywm8.ywm.admin.dao.BaseDao;
import com.ywm8.ywm.admin.service.AdminService;
import com.ywm8.ywm.domain.Admin;

/**
 * @author wangruishun
 * @version ywm8 1.0 2014-1-11 上午10:45:48
 */
@Service("adminService")
public class AdminServiceImpl extends BaseServiceImpl<Admin> implements
		AdminService {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.ywm8.ywm.admin.service.impl.BaseServiceImpl#setDao(com.ywm8.ywm.admin
	 * .dao.BaseDao)
	 */
	@Resource(name = "adminDao")
	private BaseDao<Admin> adminDao;

	@SuppressWarnings("rawtypes")
	@Override
	@Resource(name = "adminDao")
	public void setDao(BaseDao dao) {
		super.setDao(dao);
	}
//更新图片路径
	public void updatePicturePath(Integer sid, String path) {

		String hql = "update Admin a set a.picturePath = ? where a.id = ?";
		adminDao.batchEntityByHQL(hql, path, sid);

	}

}
